package org.example.springioc.Controller;

import org.apache.catalina.User;
import org.example.springioc.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class HelloController {

    @Autowired
    private UserService userService;
    public HelloController(){

    }

    public HelloController(UserService userService){
        this.userService = userService;
    }


    public void sayHi(){
        userService.doService();
        System.out.println("hi, helloController....");
    }
}
